package com.sq;

import cn.hutool.core.io.FileUtil;
import lombok.extern.slf4j.Slf4j;

import java.nio.charset.StandardCharsets;

/**
 * Hello world!
 */
@Slf4j
public class AppData {
    public static void main(String[] args) throws Exception {
        String url = "http://172.20.1.100:8020/crswap/forecastService?wsdl";
        url = "http://127.0.0.1:8020/crswap/forecastService?wsdl";
        //url = "http://127.0.0.1:8020/crswap/arrivalService?wsdl";

        log.info("======开始调用webservice======");
        String readString = FileUtil.readString("/Users/zhuzi/workspace/soft/ideatool/wk/mzl/sendWebService/src/main/resources/data.txt", StandardCharsets.UTF_8);

        log.info("发送数据[{}]", readString);
        String response = ClientUtil.callWebSV(url, "greeting", readString);
        log.info("======结束调用webservice=返回结果[{}]=====", response);
    }
}
